import java.util.ArrayList;

/**
 * @Author YuanYuan
 * @Date 2023/1/6
 * @Time 10:37
 */
class Bay extends Lake {
    public void method1() {
        System.out.println("Bay 1");
        super.method2();
    }
    public void method2() {
        System.out.println("Bay 2");
    }
}
class Pond {
    public void method2() {
        System.out.println("Pond 2");
    }
}
class Ocean extends Bay {
    @Override
    public void method2() {
        System.out.println("Ocean 2");
    }
}
class Lake extends Pond {
    public void method3() {
        System.out.println("Lake 3");
        method2();
    }
}
public class Test {
    static String s = "";
    static void doStuff() throws RuntimeException {
        try {
            System.out.println("e");
            throw new IllegalArgumentException();
        }catch (IllegalArgumentException ie) {
            System.out.println("d");
        }catch (Exception e) {
            System.out.println("c");
        }
        throw new IllegalArgumentException();
    }
    abstract interface A {
        abstract void print();
    }
    public static void main(String[] args) {

//        try {
//            doStuff();
//        }catch (Exception ex) {
//            System.out.println("b");
//        }
//        System.out.println("a");
//        Lake var1 = new Ocean();
//        Pond var2 = new Pond();
//        Pond var3 = new Lake();
//        Object var4 = new Bay();
//        Lake var5 = new Bay();
//        Bay var6 = new Ocean();
//
//        var1.method2();
//        var3.method2();
//        //var4.method2();
//        var1.method3();
//        //var3.method3();
//        ((Ocean)var5).method1();;
//        //((Lake)var3).method3();
//       //((Lake)var4).method1();
//       //((Bay)var4).method1();
//        ((Lake)var2).method3();
    }
}
